package main

import (
	"flag"
	"fmt"
	"strconv"
)

// Solve this problem https://stackoverflow.com/questions/59952721/how-to-read-t-as-tab-in-golang
// works also for:
//    go run main.go -sep $'\t\tyes'

func main() {
	var sep string
	flag.StringVar(&sep, "sep", " ", "separator")
	flag.Parse()

	sep, err := strconv.Unquote(`"` + sep + `"`)
	if err != nil {
		panic(err)
	}

	fmt.Println("name" + sep + "xxx")

	// separator is quoted by golang
	fmt.Printf("%q\n", sep)
}
